import React from 'react'
import { useNavigate } from 'react-router-dom';
import { NavBar, Cell  } from 'react-vant';
import './my.css'
export default function My() {
  let navigate = useNavigate()
  const rem = () => {
    localStorage.clear()
    navigate('/home')
  }
  return (
    <div className='my-box'>
      
      <NavBar
      title="个人中心"
      leftText="返回"
      rightText="退出"
      onClickLeft={() => navigate(-1) }
      onClickRight={rem}
    />
    <div className='my-nav'>
      <div className='my-title'>个人中心</div>
    <Cell title='地址管理' isLink onClick={() => navigate('/address')} />
    <Cell title='订单中心' isLink onClick={() => navigate('/order')} />
    </div>


    </div>
  )
}
